package com.ricervcvcer.user.mapper;

import com.ricervcvcer.user.entity.SysPermis;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author moge
 * @since 2022-01-10
 */
public interface SysPermisMapper extends BaseMapper<SysPermis> {

    //查询用户具有的权限字符串
    @Select("select p.per_content from sys_grp_per gp left join sys_permis p on gp.gf_per_id = p.per_id where gp.gf_grp_id = #{grpId}")
    List<String> selectPerContentByGrpId(@Param("grpId") Integer grpId);
}
